from django.conf.urls.defaults import *
from models import Note

notes = Note.objects.all()

urlpatterns = patterns('',
    url(r'^$', 'django.views.generic.list_detail.object_list', dict(queryset=notes)),
    url(r'^note/(?P<slug>[-\w]+)/$', 'django.views.generic.list_detail.object_detail', dict(queryset=notes, slug_field='slug'), name='note_detail'),
    url(r'^create/$','notes.views.create_note'),
    url(r'^note/(?P<slug>[-\w]+)/update/$','notes.views.update_note'),
    
)


#    url(r'^django_test/(?P<pk>\d+)/results/$', DetailView.as_view( model=Poll, template_name='django_test/results.html'), name='poll_results'),    
